package com.dukun.es.entity.es;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.domain.Slice;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * Author：DK
 * Description：ES user实体类
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Document(indexName = "user", createIndex = true)
public class EsUser {

    @Id
    private int id;

    @Field(type = FieldType.Text)
    private String name;

    @Field(type = FieldType.Integer)
    private int age;
}
